package com.ee.chat.common.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ee.chat.common.entity.ChannelEarn;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author Shane
 * @since 2020-04-09
 */
public interface ChannelEarnMapper extends BaseMapper<ChannelEarn> {
    /**
     * 删除指定渠道的收益配置
     * @Author Shane
     * @Date 2020/4/9 15:58
     * @param
     * @return
     */
    int deleteByCid(@Param("cid") Integer cid);

    /**
     * 批量新增
     * @Author Shane
     * @Date 2020/4/9 16:00
     * @param
     * @return
     */
    int insertBatch(@Param("earns") List<ChannelEarn> earns);

    /**
     * 查询渠道的指定收益
     * @Author Shane
     * @Date 2020/4/10 15:29
     * @param
     * @return
     */
    double selectValue(@Param("cid") Integer cid, @Param("key") String key);
}